<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/salesinfo/unsold/q_unsold.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/salesinfo/unsold/q_unsold.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'Delivery_requestList',
                footer: "Foots",
                cnName: '未销售合同商品',
                name: 'unsold/q_unsold',
                url: "/q_unsold/",
                sortName: "Goods_sub"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"Sales_contract_voucher_sub":"","Goods_sub":"","Goods_name":"","Goods_num":[null,null]});
            const searchFormOptions = ref([[{"title":"销售合同","field":"Sales_contract_voucher_sub","type":"like"},{"title":"商品编码","field":"Goods_sub","type":"like"},{"title":"商品名称","field":"Goods_name","type":"like"},{"title":"发货数量","field":"Goods_num","type":"range"}]]);
            const columns = ref([{field:'库位',title:'库位',type:'string',bind:{ key:'库位编码',data:[]},width:110,align:'left',sort:true},
                       {field:'Sales_contract_voucher_sub',title:'销售合同',type:'string',width:180,align:'left'},
                       {field:'Goods_sub',title:'商品编码',type:'string',width:110,align:'left'},
                       {field:'Goods_name',title:'商品名称',type:'string',width:220,align:'left'},
                       {field:'Goods_size',title:'规格',type:'string',width:110,align:'left'},
                       {field:'Goods_price',title:'单价',type:'decimal',width:110,align:'left'},
                       {field:'Total_price',title:'总价',type:'decimal',width:110,align:'left'},
                       {field:'Tax_exclusive_total_price',title:'无税总价',type:'decimal',width:110,align:'left'},
                       {field:'Contract_goods_num',title:'未销售数量',type:'float',width:110,align:'left'},
                       {field:'Goods_num',title:'发货数量',type:'float',width:110,require:true,align:'left'},
                       {field:'Delivery_requestList',title:'发货明细ID',type:'guid',width:110,hidden:true,require:true,align:'left'},
                       {field:'AuditDate',title:'AuditDate',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'AuditStatus',title:'AuditStatus',type:'int',width:110,hidden:true,align:'left'},
                       {field:'AuditID',title:'AuditID',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Auditor',title:'Auditor',type:'string',width:120,hidden:true,align:'left'},
                       {field:'CreateID',title:'CreateID',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Creator',title:'Creator',type:'string',width:100,hidden:true,align:'left'},
                       {field:'CreateDate',title:'CreateDate',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ModifyID',title:'ModifyID',type:'int',width:100,hidden:true,align:'left'},
                       {field:'Modifier',title:'Modifier',type:'string',width:100,hidden:true,align:'left'},
                       {field:'ModifyDate',title:'ModifyDate',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'Logistics_status',title:'Logistics_status',type:'int',width:110,hidden:true,align:'left'},
                       {field:'Install_status',title:'Install_status',type:'int',width:110,hidden:true,align:'left'},
                       {field:'sales_contractList_ID',title:'sales_contractList_ID',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'Remark',title:'Remark',type:'string',width:220,hidden:true,align:'left'},
                       {field:'Delivery_request',title:'Delivery_request',type:'guid',width:110,hidden:true,align:'left'},
                       {field:'可用数量',title:'库存可用数量',type:'float',width:110,align:'left'},
                       {field:'库存ID',title:'库存ID',type:'guid',width:110,hidden:true,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
